home *** CD-ROM | disk | FTP | other *** search
/ Aminet 6 / Aminet 6 - June 1995.iso / Aminet / util / rexx / InfraRexx1_5.lha / InfraRexx / Install < prev    next >
Encoding:
Text File  |  1995-03-26  |  18.3 KB  |  822 lines

  1. ;
  2. ; InfraRexx 1.5 Installer Script
  3. ; $VER: InfraRexx_Install 1.0 (9.3.95)
  4. ;
  5. (message
  6.   "\nWelcome to the\nInfraRexx Installer Utility\n\n"
  7.   "This program will install\n"
  8.   "InfraRexx release 1.5.\n"
  9.   "\n"
  10.   "The 'Help...' button will provide\n"
  11.   "help during the installation.\n"
  12.   "\n"
  13.   "InfraRexx and InfraJoy are\n"
  14.   "© 1994-1995 by Leon Woestenberg\n"
  15.   "(Digital Disturbance) and\n"
  16.   "Jeroen Steenblik.\n"
  17. )
  18. (welcome)
  19.  
  20. ;
  21. ; check AmigaOS version
  22. ;
  23. (transcript "Checking AmigaOS version...")
  24. (if
  25.   (<
  26.     (/
  27.       (getversion)
  28.       65536
  29.     )
  30.     37
  31.   )
  32.   (
  33.     (transcript "Aborting because AmigaOS Release 2.04 (or higher) is not available.")
  34.     (abort "\nInfraRexx requires at least AmigaOS Release 2.04 to run.\n\n"
  35.            "Press the Proceed button to abort the installation procedure.")
  36.  
  37.   )
  38.   (transcript "AmigaOS version 2.04 (or higher) found. Proceeding.")
  39. )
  40. (complete 0)
  41.  
  42. ;
  43. ; Ask for the version of the used hardware
  44. ;
  45. (set hardware-choice
  46.   (askchoice
  47.     (prompt "What hardware is used?\n(Use 'Help' for more information)")
  48.     (help "About the hardware:\n"
  49.           "    InfraRexx requires a small hardware extension in order to "
  50.           "operate. Due to the availability of several hardware versions "
  51.           "the software has to be configured to use the correct version.\n"
  52.           "\n"
  53.           "Determining the hardware version:\n"
  54.           "    If you have ordered the hardware directly from the authors, you "
  55.           "can read the version number from the print circuit board. If there's "
  56.           "no version indication, you have an InfraJoy v1 design.\n"
  57.           "\n"
  58.           "    If you built (or later patched) the hardware yourself, check the "
  59.           "building (or patch) documentation to determine the version number.\n"
  60.           "\n"
  61.           "    If you have no hardware yet, you can either order it from the authors "
  62.           "or build it yourself. See the documentation for more information on this. "
  63.           "If you choose to install the software now, please select the latest version number.\n"
  64.           "\n"
  65.           @askchoice-help
  66.     )
  67.     (choices
  68.       "InfraJoy v1"
  69.       "InfraJoy v2"
  70.       "InfraJoy v3"
  71.     )
  72.     (default 2)
  73.   )
  74. )
  75.  
  76. ;
  77. ; Ask where to install the InfraRexx drawer
  78. ;
  79. (set infrarexx-dest
  80.   (tackon
  81.     (askdir
  82.       (prompt "Where should the InfraRexx drawer be installed?")
  83.       (help
  84.         "InfraRexx Destination:\n"
  85.         "    Please choose a place on your (hard)disk where you would like "
  86.         "the InfraRexx software, and documentation to be installed. A new "
  87.         "drwawer called 'InfraRexx' will be created there, and most of the "
  88.         "files will be copied there.\n"
  89.         "\n"
  90.       @askdir-help)
  91.       (default @default-dest)
  92.     )
  93.     "InfraRexx"
  94.   )
  95. )
  96. (set @default-dest infrarexx-dest)
  97. (complete 10)
  98.  
  99. (copyfiles
  100.   (source "InfraRexxEditor")
  101.   (dest infrarexx-dest)
  102.   (infos)
  103. )
  104. (complete 20)
  105.  
  106. (copyfiles
  107.   (source "InfraRexxDaemon")
  108.   (dest infrarexx-dest)
  109.   (infos)
  110. )
  111. (complete 30)
  112.  
  113. ;
  114. ; Set the hardware version tooltypes
  115. ;
  116. (tooltype
  117.   (dest
  118.     (tackon
  119.       infrarexx-dest
  120.       "InfraRexxEditor"
  121.     )
  122.   )
  123.   (settooltype
  124.     "HARDWARE"
  125.     (select
  126.       hardware-choice
  127.       "1"
  128.       "2"
  129.       "3"
  130.     )
  131.   )
  132. )
  133. (tooltype
  134.   (dest
  135.     (tackon
  136.       infrarexx-dest
  137.       "InfraRexxDaemon"
  138.     )
  139.   )
  140.   (settooltype
  141.     "HARDWARE"
  142.     (select
  143.       hardware-choice
  144.       "1"
  145.       "2"
  146.       "3"
  147.     )
  148.   )
  149. )
  150. (complete 35)
  151. ;
  152. ; Check for locale.library
  153. ;
  154. (if
  155.   (>=
  156.     (/
  157.       (getversion "LIBS:locale.library")
  158.       65536
  159.     )
  160.     38
  161.   )
  162.   (
  163.     ;
  164.     ; Guess catalogs to be installed
  165.     ;
  166.     (set catalog-options
  167.       (+
  168.         (if (exists "LOCALE:Catalogs/Dansk") 1)
  169.        ;(if (exists "LOCALE:Catalogs/German") 1)
  170.         (if (exists "LOCALE:Catalogs/Italiano") 2)
  171.         (if (exists "LOCALE:Catalogs/Nederlands") 4)
  172.         (if (exists "LOCALE:Catalogs/Svenska") 8)
  173.        0 ; needed because none, or just one directory may exist,
  174.        0 ; in which case the + has too few arguments.
  175.       )
  176.     )
  177.     ;
  178.     ; Ask for catalogs to be installed
  179.     ;
  180.     (set catalog-options
  181.       (askoptions
  182.         (prompt "Which language catalogs do you want to install?\n"
  183.         (choices
  184.           "Dansk"
  185.          ;"German"
  186.           "Italiano"
  187.           "Nederlands"
  188.           "Svenska"
  189.         )
  190.         (default catalog-options)
  191.         (help
  192.           "Language catalogs:\n"
  193.           "    Starting with Workbench 2.1, Amiga programs can present "
  194.           "themselves in different languages, as long as program specific "
  195.           "catalogs for that language are present. Here you can select "
  196.           "which language catalogs you would like to install.\n"
  197.           "    Use the Workbench `Locale' Preferences program to select "
  198.           "your preferred language. InfraRexx will appear in that language, "
  199.           "when the language's catalog is available and installed.\n"
  200.           "\n"
  201.           @askoptions-help)
  202.         )
  203.       )
  204.     )
  205.     ;
  206.     ; Install the selected catalogs
  207.     ;
  208.     (set current 0)
  209.     (while
  210.       (< current 4) ;latest number indicates #languages
  211.       (
  212.         (if
  213.           (IN catalog-options current)
  214.           (
  215.             (copyfiles
  216.               (prompt "Copying the selected catalogs...\n")
  217.               (source
  218.                 (tackon
  219.                   "Catalogs"
  220.                   (select current
  221.                     "Dansk"
  222.                    ;"German"
  223.                     "Italiano"
  224.                     "Nederlands"
  225.                     "Svenska"
  226.                   )
  227.                 )
  228.               )
  229.               (pattern
  230.                 "#?.catalog"
  231.               )
  232.               (dest
  233.                 (tackon
  234.                   "LOCALE:Catalogs"
  235.                   (select current
  236.                     "Dansk"
  237.                    ;"German"
  238.                     "Italiano"
  239.                     "Nederlands"
  240.                     "Svenska"
  241.                   )
  242.                 )
  243.               )
  244.               (help @copyfiles-help)
  245.             )
  246.           )
  247.         )
  248.         (set current (+ current 1))
  249.       )
  250.     )
  251.   )
  252. )
  253. (complete 40)
  254. ;
  255. ; Rename previous codeset directory if present
  256. ;
  257. (if
  258.   (=
  259.     (exists
  260.       (tackon
  261.          infrarexx-dest
  262.          "Codesets"
  263.       )
  264.       (noreq)
  265.     )
  266.     2
  267.   )
  268.   (
  269.     (transcript "Codesets directory found.")
  270.     (rename
  271.       (tackon
  272.         infrarexx-dest
  273.         "Codesets"
  274.       )
  275.       (tackon
  276.         infrarexx-dest
  277.         "Your_Pre_1.5_Codesets"
  278.       )
  279.       (prompt
  280.         "Renaming your old codesets directory to prevent "
  281.         "overwriting your edited codeset files.\n")
  282.       (help
  283.         "Renaming Codesets directory:\n"
  284.         "    The Install Utility tried to install the codeset "
  285.         "directory, but such a directory was already present. "
  286.         "You are now asked to rename the existing directory, so "
  287.         "that the contained files will not be overwritten. "
  288.         "Select either 'Proceed' to rename the existing directory to "
  289.         "'Your_Pre_1.5_Codesets' or 'Skip' to resume without renaming."
  290.       )
  291.       (confirm)
  292.     )
  293.   )
  294. )
  295. (complete 45)
  296. ;
  297. ; Ask for codeset to be used
  298. ;
  299. (set usedcodeset-options
  300.   (select
  301.     (set usedcodeset-choice
  302.       (askchoice
  303.         (prompt "Please select the command codeset that you want to use initially:\n")
  304.         (choices
  305.          ;"Akai"
  306.          ;"Canon"
  307.          ;"Goldstar"
  308.          ;"Hitachi"
  309.           "JVC"
  310.          ;"Kenwood"
  311.          ;"NEC"
  312.          ;"Onkyo"
  313.           "Panasonic"
  314.           "Philips"
  315.           "Pioneer"
  316.          ;"Sharp"
  317.           "Sony"
  318.          ;"Teac"
  319.           "Technics"
  320.          ;"Yamaha"
  321.         )
  322.         (default 0)
  323.         (help "Initial codeset selection:\n"
  324.               "    You are asked for a command codeset that will be used if "
  325.               "you start the InfraRexx Daemon immediately after installation. "
  326.               "Please select an electronics brand you possess which you want "
  327.               "InfraRexx to communicate with. Of course you can later change this.\n"
  328.               "\n"
  329.               @askchoice-help
  330.         )
  331.       )
  332.     )
  333.    ;(shiftleft 1 0)  ;Akai
  334.    ;(shiftleft 1 1)  ;Canon
  335.    ;(shiftleft 1 2)  ;Goldstar
  336.    ;(shiftleft 1 3)  ;Hitachi
  337.     (shiftleft 1 4)  ;JVC
  338.    ;(shiftleft 1 5)  ;Kenwood
  339.    ;(shiftleft 1 6)  ;NEC
  340.    ;(shiftleft 1 7)  ;Onkyo
  341.     (shiftleft 1 8)  ;Panasonic
  342.     (shiftleft 1 9)  ;Philips
  343.     (shiftleft 1 10) ;Pioneer
  344.    ;(shiftleft 1 11) ;Sharp
  345.     (shiftleft 1 12) ;Sony
  346.    ;(shiftleft 1 13) ;Teac
  347.     (shiftleft 1 14) ;Technics
  348.    ;(shiftleft 1 15) ;Yamaha
  349.   )
  350. )
  351. ;
  352. ; Set FROM tooltype to used codeset
  353. ;
  354. (tooltype
  355.   (dest
  356.     (tackon
  357.       infrarexx-dest
  358.       "InfraRexxDaemon"
  359.     )
  360.   )
  361.   (settooltype
  362.     "FROM"
  363.     (tackon
  364.       infrarexx-dest
  365.       (tackon
  366.         "Codesets"
  367.         (select
  368.           usedcodeset-choice
  369.          ;"Akai"
  370.          ;"Canon"
  371.          ;"Goldstar"
  372.          ;"Hitachi"
  373.           "JVC"
  374.          ;"Kenwood"
  375.          ;"NEC"
  376.          ;"Onkyo"
  377.           "Panasonic"
  378.           "Philips"
  379.           "Pioneer"
  380.          ;"Sharp"
  381.           "Sony"
  382.          ;"Teac"
  383.           "Technics"
  384.          ;"Yamaha"
  385.         )
  386.       )
  387.     )
  388.   )
  389. )
  390. (complete 50)
  391. ;
  392. ; Ask for additional codesets to be installed
  393. ;
  394. (set additionalcodeset-options
  395.   (askoptions
  396.     (prompt "Please select additional command codesets that you want to install: (Empty codesets are marked with ¹)\n"
  397.     (choices
  398.        "Akai¹"
  399.        "Canon¹"
  400.        "Goldstar¹"
  401.        "Hitachi¹"
  402.        "JVC"
  403.        "Kenwood¹"
  404.        "NEC¹"
  405.        "Onkyo¹"
  406.        "Panasonic"
  407.        "Philips"
  408.        "Pioneer"
  409.        "Sharp¹"
  410.        "Sony"
  411.        "Teac¹"
  412.        "Technics"
  413.        "Yamaha¹"
  414.     )
  415.     (default usedcodeset-options)
  416.     (help
  417.       "Additional codesets selection:\n"
  418.       "    Here you may choose codesets that will be installed into the "
  419.       "codesets directory; either empty codesets that you use as a base "
  420.       "project for learning new codes, or supplemental codesets for "
  421.       "other electronic brands than that of the initial codeset.\n"
  422.       "\n"
  423.       @askoptions-help)
  424.     )
  425.   )
  426. )
  427. ;
  428. ; Merge the used and additonal codesets together
  429. ;
  430. (set codesets-options
  431.   (BITOR
  432.     usedcodeset-options
  433.     additionalcodeset-options
  434.   )
  435. )
  436. ;
  437. ; Install the selected codesets
  438. ;
  439. (set current 0)
  440. (while
  441.   (< current 16) ;latest number indicates #codesets
  442.   (
  443.     (if
  444.       (IN codesets-options current)
  445.       (
  446.         (copyfiles
  447.           (prompt "Copying the selected codesets...\n")
  448.           (source
  449.             (tackon
  450.               "Codesets"
  451.               (select
  452.                 current
  453.                 "Akai"
  454.                 "Canon"
  455.                 "Goldstar"
  456.                 "Hitachi"
  457.                 "JVC"
  458.                 "Kenwood"
  459.                 "NEC"
  460.                 "Onkyo"
  461.                 "Panasonic"
  462.                 "Philips"
  463.                 "Pioneer"
  464.                 "Sharp"
  465.                 "Sony"
  466.                 "Teac"
  467.                 "Technics"
  468.                 "Yamaha"
  469.               )
  470.             )
  471.           )
  472.           (dest
  473.             (tackon infrarexx-dest "Codesets")
  474.           )
  475.           (help @copyfiles-help)
  476.         )
  477.       )
  478.     )
  479.     (set current (+ current 1))
  480.   )
  481. )
  482. (complete 55)
  483. ;
  484. ; Guess documentation to be installed
  485. ;
  486. (set documentation-options
  487.   (if
  488.     (=
  489.       hardware-choice
  490.       2
  491.     )
  492.     3
  493.     31)
  494. )
  495. ;
  496. ; Ask for documentation to be installed
  497. ;
  498. (set documentation-options
  499.   (askoptions
  500.     (prompt "What documentation do you want to install?\n"
  501.     (choices "InfraRexx User Guide"
  502.              "Hardware Info/Build/Patch Guide"
  503.              "Hardware Schematic (IFF format)"
  504.              "Hardware PCB Layout (IFF format)"
  505.              "Hardware PCB Layout (Postscript format)"
  506.     )
  507.     (default documentation-options)
  508.     (help "Documentation description:\n"
  509.           "    The InfraRexx User Guide describes every aspect of this package, "
  510.           "except the hardware construction. It is therefore advisable to "
  511.           "install and read this guide.\n"
  512.           "\n"
  513.           "    The hardware can be ordered from the authors (read the "
  514.           "InfraRexx User Guide), but you can also build it yourself. "
  515.           "For this purpose, there is a Hardware Guide to guide you "
  516.           "through the building process in a comfortable way. For users "
  517.           "who already have the hardware, there are patch instructions "
  518.           "to upgrade it.\n"
  519.           "\n"
  520.           "    Choose the Hardware Schematic and/or Print Circuit Board "
  521.           "Layouts as a source for your hardware. Both are available in "
  522.           "IFF bitmap format, common to the Amiga, while the layout is "
  523.           "available in PostScript as well, used by professional "
  524.           "(laser)printers.\n"
  525.           "\n"
  526.           @askoptions-help)
  527.     )
  528.   )
  529. )
  530. (complete 60)
  531. ;
  532. ; Determine if MultiView exists on this system
  533. ;
  534. (set multiview-exists
  535.   (exists
  536.     "SYS:Utilities/MultiView"
  537.     (noreq)
  538.   )
  539. )
  540. ;
  541. ; Install InfraRexx User Guide if selected
  542. ;
  543. (if
  544.   (IN documentation-options 0)
  545.   (
  546.     (copyfiles
  547.       (prompt "Installing the InfraRexx User Guide...")
  548.       (source "InfraRexx.guide")
  549.       (dest
  550.         (set userguide-dest
  551.           (askdir
  552.             (prompt "Select a place for the InfraRexx User Guide.")
  553.             (default infrarexx-dest)
  554.             (help @askdir-help)
  555.           )
  556.         )
  557.       )
  558.       (infos)
  559.       (help @copyfiles-help)
  560.     )
  561.     (copyfiles
  562.       (prompt "Installing the InfraRexx Order Form...")
  563.       (source "OrderForm")
  564.       (dest userguide-dest)
  565.       (help @copyfiles-help)
  566.     )
  567.     (if
  568.       multiview-exists
  569.       (tooltype
  570.         (dest
  571.           (tackon userguide-dest "InfraRexx.guide")
  572.         )
  573.         (setdefaulttool "MultiView")
  574.       )
  575.     )
  576.   )
  577. )
  578. (complete 70)
  579. ;
  580. ; Install InfraRexx Hardware Guide if selected
  581. ;
  582. (if
  583.   (IN documentation-options 1)
  584.   (
  585.     (copyfiles
  586.       (prompt "Installing the Hardware Building Guide...")
  587.       (source "Hardware/Hardware.guide")
  588.       (dest
  589.         (tackon
  590.           infrarexx-dest
  591.           "Hardware"
  592.         )
  593.       )
  594.       (infos)
  595.       (help @copyfiles-help)
  596.     )
  597.     (if
  598.       multiview-exists
  599.       (tooltype
  600.         (dest
  601.           (tackon userguide-dest "Hardware.guide")
  602.         )
  603.         (setdefaulttool "MultiView")
  604.       )
  605.     )
  606.   )
  607. )
  608. (complete 75)
  609. ;
  610. ; Install InfraRexx Hardware Schematic if selected
  611. ;
  612. (if
  613.   (IN documentation-options 2)
  614.   (
  615.     (copyfiles
  616.       (prompt "Installing the Hardware Schematic...")
  617.       (source "Hardware/Schematic.iff")
  618.       (dest
  619.         (tackon
  620.           infrarexx-dest
  621.           "Hardware"
  622.         )
  623.       )
  624.       (infos)
  625.       (help @copyfiles-help)
  626.     )
  627.     (if
  628.       multiview-exists
  629.       (tooltype
  630.         (dest
  631.           (tackon infrarexx-dest "Hardware/Schematic.iff")
  632.         )
  633.         (setdefaulttool "MultiView")
  634.       )
  635.     )
  636.   )
  637. )
  638. (complete 80)
  639. ;
  640. ; Install InfraRexx Hardware Layouts (IFF) if selected
  641. ;
  642. (if
  643.   (IN documentation-options 3)
  644.   (
  645.     (copyfiles
  646.       (prompt "Installing the Hardware Layouts (IFF)...")
  647.       (source "Hardware")
  648.       (dest
  649.         (tackon
  650.           infrarexx-dest
  651.           "Hardware"
  652.         )
  653.       )
  654.       (choices
  655.         "BothSides.iff"
  656.         "ComponentSide.iff"
  657.         "SolderSide.iff"
  658.       )
  659.       (infos)
  660.       (help @copyfiles-help)
  661.     )
  662.     (if
  663.       multiview-exists
  664.       (
  665.         (tooltype
  666.           (dest
  667.             (tackon infrarexx-dest "Hardware/BothSides.iff")
  668.           )
  669.           (setdefaulttool "MultiView")
  670.         )
  671.         (tooltype
  672.           (dest
  673.             (tackon infrarexx-dest "Hardware/ComponentSide.iff")
  674.           )
  675.           (setdefaulttool "MultiView")
  676.         )
  677.         (tooltype
  678.           (dest
  679.             (tackon infrarexx-dest "Hardware/SolderSide.iff")
  680.           )
  681.           (setdefaulttool "MultiView")
  682.         )
  683.       )
  684.     )
  685.   )
  686. )
  687. (complete 85)
  688. ;
  689. ; Install InfraRexx Hardware Layouts (PostScript) if selected
  690. ;
  691. (if
  692.   (IN documentation-options 4)
  693.   (
  694.     (copyfiles
  695.       (prompt "Installing the Hardware Layouts (PostScript)...")
  696.       (source "Hardware")
  697.       (dest
  698.         (tackon
  699.           infrarexx-dest
  700.           "Hardware"
  701.         )
  702.       )
  703.       (choices
  704.         "ComponentSide.ps"
  705.         "SolderSide.ps"
  706.       )
  707.       (infos)
  708.       (help @copyfiles-help)
  709.     )
  710.   )
  711. )
  712. (complete 90)
  713. ;
  714. ; Ask for examples to be installed
  715. ;
  716. (set examples-options
  717.   (askoptions
  718.     (prompt "Please select any examples you want to install:"
  719.     (choices "Scala Example"
  720.              "Toolmanager Example"
  721.     )
  722.     (default 3)
  723.     (help
  724.        "Examples:\n"
  725.        "    These examples show you some ways of using InfraRexx. "
  726.        "Use your imagination and available software to achieve "
  727.        "other ways of using this product, that even the authors "
  728.        "didn't think of.\n"
  729.        "    And ehh..., feel free to let us know what that might be...:-)\n"
  730.        "\n"
  731.        @askoptions-help)
  732.     )
  733.   )
  734. )
  735. ;
  736. ; Install the selected examples
  737. ;
  738. (set current 0)
  739. (while
  740.   (< current 2) ;latest number indicates #examples
  741.   (
  742.     (if
  743.       (IN examples-options current)
  744.       (
  745.         (copyfiles
  746.           (prompt "Copying the selected examples...\n")
  747.           (source
  748.             "Examples"
  749.           )
  750.           (pattern
  751.             (select
  752.                current
  753.                "ScalaExample#?"
  754.                "ToolManagerExample#?"
  755.             )
  756.           )
  757.           (dest
  758.             (tackon infrarexx-dest "Examples")
  759.           )
  760.           (infos)
  761.           (help @copyfiles-help)
  762.         )
  763.       )
  764.     )
  765.     (set current (+ current 1))
  766.   )
  767. )
  768. (complete 95)
  769. ;
  770. ; Ask for RexxEvent to be installed
  771. ;
  772. (set rexxevent-bool
  773.   (askbool
  774.     (prompt
  775.       "Install the handy 'RexxEvent' software?\n\n"
  776.       "Besides remote-controlling programs via ARexx, "
  777.       "you can steer them via keypresses and other inputevents, "
  778.       "if you have RexxEvent running.\n"
  779.     )
  780.     (help
  781.        "RexxEvent\n"
  782.        "    This small program enables you to force events to happen "
  783.        "using ARexx. An event can be the touch of a key, or the click "
  784.        "of a mousebutton, etc. In combination with the InfraRexxDaemon, "
  785.        "this enables you to control certain software via your remote "
  786.        "controller.\n"
  787.     )
  788.   )
  789. )
  790. ;
  791. ; Install RexxEvent
  792. ;
  793. (if
  794.   (=
  795.     rexxevent-bool
  796.     1
  797.   )
  798.   (copyfiles
  799.     (prompt "Copying RexxEvent...\n")
  800.     (source
  801.       "RexxEvent"
  802.     )
  803.     (all)
  804.     (dest
  805.       (tackon infrarexx-dest "RexxEvent")
  806.     )
  807.     (infos)
  808.     (help @copyfiles-help)
  809.   )
  810. )
  811. (complete 100)
  812.  
  813. (exit "You have just installed release 1.5 of InfraRexx.\n"
  814.       "\n"
  815.       "Now enjoy it!\n"
  816.       "\n"
  817.       "InfraRexx and InfraJoy are\n"
  818.       "© 1994-1995 by Leon Woestenberg\n"
  819.       "(Digital Disturbance) and\n"
  820.       "Jeroen Steenblik.\n"
  821. )
  822.